import java.util.Random;


public class TicketGratter extends Ticket{
	
	public TicketGratter(int cout) {
		super(cout);
		int indice = new Random().nextInt(Ticket.GAINSgratter.length);
		super.gain=Ticket.GAINSgratter[indice];	
	}
	
	public int gratter(){
		return super.gain;
	}
	
	public String toString(){
		return super.toString() +"Le gain du ticket est "+this.gratter();
	}
}
